home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows5 / zipit11.zip / CTLHWND.TXT < prev    next >
Text File  |  1991-08-07  |  899b  |  25 lines

  1. CTLWHWND.DLL
  2. Support function for getting the hWnd of any control.
  3. by Jonathan Zuck
  4. Copyright 1991 User Friendly, Inc.
  5.  
  6.  
  7. Greetings!
  8.         I got tired of the dumb method of getting the hWnd to a control
  9. using GetFocus/SetFocus/GetFocus/PutFocus as suggested in the MSKB.
  10. Therefore, I create CTLHWND.DLL which contains only one function:
  11. ControlhWnd.  This is an integer function declared as follows:
  12.  
  13.         declare function ControlhWnd% lib "CTLHWND.DLL" (Ctl as Control)
  14.  
  15. you may then make use of it in a VB application using the following syntax:
  16.  
  17.         Wnd = ControlhWnd% (List1)
  18.                            (Text1)
  19.                            (Command1)
  20.                            (File1)
  21.  
  22. etc., where the passed parameter is simply the CtlName of the control for
  23. which you want to get the window handle.  Hope this helps people trying to
  24. make API calls. -=- Jonathan
  25.